package com.example.concurrency.config;

import com.example.concurrency.HttpInerceptor;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * @author 文希
 * @create 2019-05-19 14:07
 */
@Component
public class InterceptorConfig extends WebMvcConfigurerAdapter {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new HttpInerceptor()).addPathPatterns("/**");
    }
}
